﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Project;
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
using System.Runtime.InteropServices;

namespace YPS.YoungPHPStudioProjectTypePackage
{
    [Guid(GuidList.guidYPSProjectFactory)]
    public class PHPProjectFactory : ProjectFactory
    {
        YoungPHPStudioProjectTypePackagePackage package;

        public PHPProjectFactory(YoungPHPStudioProjectTypePackagePackage package)
            :base(package)
        {
            this.package = package;
        }

        protected override ProjectNode CreateProject()
        {
            //return new PHPProjectNode();
            ////PythonProjectNode project = new PythonProjectNode(this.Package as PythonProjectPackage);
            ////project.SetSite((IOleServiceProvider)((IServiceProvider)this.Package).GetService(typeof(IOleServiceProvider)));
            ////return project;

            PHPProjectNode project = new PHPProjectNode(this.package as YoungPHPStudioProjectTypePackagePackage);
            project.SetSite((IOleServiceProvider)((IServiceProvider)this.package).GetService(typeof(IOleServiceProvider)));
            return project;
        }
    }
}
